﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using G04P1_LogikaBiznesowa;
namespace G04P1_Interface
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        Class1 clasa = new Class1(new NorthwindEntities("metadata=res://*/NorthwindModel.csdl|res://*/NorthwindModel.ssdl|res://*/NorthwindModel.msl;provider=System.Data.SqlClient;provider connection string=\";Data Source=kamil-komputer;Initial Catalog=Northwind;Integrated Security=True;MultipleActiveResultSets=True\""));
        public MainWindow()
        {
            InitializeComponent();
        }

        

        private void btnSearch_Click(object sender, RoutedEventArgs e)
        {
         dgEmployeesList.ItemsSource = clasa.ListaProduktow(Convert.ToInt32(txtLevel.Text));
         
            
        }

        private void Window_Closing_1(object sender, System.ComponentModel.CancelEventArgs e)
        {
            App.Current.Shutdown();
        }

        private void btnSearch2_Click(object sender, RoutedEventArgs e)
        {
            dgEmployeesList.ItemsSource = clasa.ListaProduktow2(Convert.ToInt32(txtLevel.Text));
        }

       

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("Projekt zespolowy \r\n Kamil Wróbel \r\n Dorota Rozburska \r\n Krzystof Dudka \r\n Kamil Kłaptocz");
        }
    }
}
